package com.note.service.note;

import com.note.pojo.Notetype;
import com.note.pojo.notePageShow;
import com.note.pojo.page;

import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;

public interface noteService {
    public boolean writeNote(String title, String content, int typeId, Timestamp pubtime, int userId) throws SQLException;
    public page allNote(int currentPage, int pageSize) throws SQLException;
    public boolean delete(int noteId) throws SQLException;
    public HashMap edit(int noteId) throws SQLException;
    public boolean updateNote(String title, String content, int typeId, int noteId) throws SQLException;
    public List<Notetype> getTypeList() throws SQLException;
    public List<notePageShow> getNoteByType(int typeId) throws SQLException;
    public List<notePageShow> getNoteByTitle(String title) throws SQLException;
    public boolean deleteTypeById(int id) throws SQLException;
    public boolean addType(String typeName) throws SQLException;
}
